package com.ruoyi.index.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.index.mapper.FhIndexPostcommentsMapper;
import com.ruoyi.index.domain.FhIndexPostcomments;
import com.ruoyi.index.service.IFhIndexPostcommentsService;

/**
 * 发布评论Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-11
 */
@Service
public class FhIndexPostcommentsServiceImpl implements IFhIndexPostcommentsService 
{
    @Autowired
    private FhIndexPostcommentsMapper fhIndexPostcommentsMapper;

    /**
     * 查询发布评论
     * 
     * @param id 发布评论主键
     * @return 发布评论
     */
    @Override
    public FhIndexPostcomments selectFhIndexPostcommentsById(Long id)
    {
        return fhIndexPostcommentsMapper.selectFhIndexPostcommentsById(id);
    }

    /**
     * 查询发布评论列表
     * 
     * @param fhIndexPostcomments 发布评论
     * @return 发布评论
     */
    @Override
    public List<FhIndexPostcomments> selectFhIndexPostcommentsList(FhIndexPostcomments fhIndexPostcomments)
    {
        return fhIndexPostcommentsMapper.selectFhIndexPostcommentsList(fhIndexPostcomments);
    }

    /**
     * 新增发布评论
     * 
     * @param fhIndexPostcomments 发布评论
     * @return 结果
     */
    @Override
    public int insertFhIndexPostcomments(FhIndexPostcomments fhIndexPostcomments)
    {
        return fhIndexPostcommentsMapper.insertFhIndexPostcomments(fhIndexPostcomments);
    }

    /**
     * 修改发布评论
     * 
     * @param fhIndexPostcomments 发布评论
     * @return 结果
     */
    @Override
    public int updateFhIndexPostcomments(FhIndexPostcomments fhIndexPostcomments)
    {
        fhIndexPostcomments.setUpdateTime(DateUtils.getNowDate());
        return fhIndexPostcommentsMapper.updateFhIndexPostcomments(fhIndexPostcomments);
    }

    /**
     * 批量删除发布评论
     * 
     * @param ids 需要删除的发布评论主键
     * @return 结果
     */
    @Override
    public int deleteFhIndexPostcommentsByIds(Long[] ids)
    {
        return fhIndexPostcommentsMapper.deleteFhIndexPostcommentsByIds(ids);
    }

    /**
     * 删除发布评论信息
     * 
     * @param id 发布评论主键
     * @return 结果
     */
    @Override
    public int deleteFhIndexPostcommentsById(Long id)
    {
        return fhIndexPostcommentsMapper.deleteFhIndexPostcommentsById(id);
    }
}
